﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="PostControl.ascx.cs" Inherits="CastUpon.PostControl" %>
<%@ Register TagPrefix="FTB" Namespace="Refresh.Web" Assembly="Refresh.Web.FreeTextBox" %>
<%@ Register TagPrefix="recaptcha" Namespace="Recaptcha" Assembly="Recaptcha" %>
<asp:Panel ID="Panel1" runat="server">
    <p>
        <asp:TextBox ID="AuthorTextbox" runat="server" TabIndex="1" ></asp:TextBox>
        <asp:RegularExpressionValidator ID="AuthorRegularExpressionValidator" runat="server" 
            ErrorMessage="This is not a supported name format." 
            ControlToValidate="AuthorTextbox" ValidationExpression="[a-zA-Z0-9 \.\,\-]*" 
            Display="Dynamic" EnableClientScript="False" SetFocusOnError="True" 
            ToolTip="This is not a supported name format."  >*</asp:RegularExpressionValidator>
        <asp:RequiredFieldValidator ID="AuthorRequiredFieldValidator" runat="server" 
            ErrorMessage="Name is required." ControlToValidate="AuthorTextbox" 
            Display="Dynamic" EnableClientScript="False" SetFocusOnError="True" 
            ToolTip="Name is required."  >*</asp:RequiredFieldValidator>
        <asp:Label ID="AuthorLabel" runat="server" Text="&lt;small&gt;Name (required)&lt;/small&gt;" AssociatedControlID="AuthorTextbox"></asp:Label>
    </p>
    <p>
        <asp:TextBox ID="MailTextbox" runat="server" TabIndex="2"  ></asp:TextBox>
        <asp:RegularExpressionValidator ID="MailRegularExpressionValidator" 
            runat="server" ErrorMessage="Please enter an existing email address." 
            ControlToValidate="MailTextbox" 
            ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" 
            Display="Dynamic" EnableClientScript="False" SetFocusOnError="True" 
            ToolTip="Please enter an existing email address."   >*</asp:RegularExpressionValidator>
        <asp:RequiredFieldValidator ID="MailRequiredFieldValidator" runat="server" 
            ErrorMessage="Email address is required." ControlToValidate="MailTextbox" 
            Display="Dynamic" EnableClientScript="False" SetFocusOnError="True" 
            ToolTip="Email address is required."  >*</asp:RequiredFieldValidator>
        <asp:Label ID="MailLabel" runat="server" Text="&lt;small&gt;Mail (will not be published) (required)&lt;/small&gt;" AssociatedControlID="MailTextbox"></asp:Label>
    </p>
    <p>
        <asp:TextBox ID="WebsiteTextbox" runat="server" TabIndex="3"  ></asp:TextBox>
        <asp:RegularExpressionValidator ID="WebsiteRegularExpressionValidator" runat="server" 
            ErrorMessage="Website is not a proper URL." ControlToValidate="WebsiteTextbox" 
            Display="Dynamic" 
            ValidationExpression="http(s)?://([\w-]+\.)+[\w-]+(/[\w- ./?%&amp;=]*)?" 
            EnableClientScript="True" SetFocusOnError="True" 
            ToolTip="Website is not a proper URL." >*</asp:RegularExpressionValidator>
        <asp:Label ID="WebsiteLabel" runat="server"  Text="&lt;small&gt;Website (IE. http://something.tld)&lt;/small&gt;" AssociatedControlID="WebsiteTextbox"></asp:Label>
    </p>
</asp:Panel>
<FTB:FreeTextBox ID="Post" runat="server"  EnableViewState="true" ReadOnly="false" Theme="simple" Width="100%" Height="100" TabIndex="4"  SupportPath="~/refresh_web/" PrototypePath="~/refresh_web/prototype.js">
<FTB:ToolbarGroup>			
			<FTB:ToolbarItem Name="Bold" />
			<FTB:ToolbarItem Name="Italic" />
			<FTB:ToolbarItem Name="Underline" />
			<FTB:ToolbarItem Name="Strikethrough" />
			<FTB:ToolbarItem Name="FontForeColorPicker" />
			<FTB:ToolbarItem Name="FontBackColorPicker" />
			<FTB:ToolbarItem Name="BulletedList" />
			<FTB:ToolbarItem Name="NumberedList" />	
			<FTB:ToolbarItem Name="CreateLink" />
			<FTB:ToolbarItem Name="Unlink" />
			<FTB:ToolbarItem Name="break" />	
			<FTB:ToolbarItem Name="Undo" />
			<FTB:ToolbarItem Name="Redo" />
	</FTB:ToolbarGroup>
	</FTB:FreeTextBox>
<p>
   <recaptcha:RecaptchaControl
            ID="recaptcha"
            runat="server"
            Theme="clean"
            PublicKey="6LfGhQIAAAAAAMnW_qorqBINaR2gXYc-Vwc3GK5I"            
            PrivateKey="6LfGhQIAAAAAAJj21dvjlXZo4i7kiGRg7BsIUH8i" 
            ErrorMessage='Please fill out the human CAPTCHA challenge-response.' TabIndex="5"
    /><a href="http://en.wikipedia.org/wiki/Captcha" target="_blank">(What is CAPTCHA?)</a>
    <asp:ValidationSummary ID="ValidationSummary" runat="server" />
 </p>
   